From 657bf630d895e0cb5c0f8da68dfdd13adb389839 Mon Sep 17 00:00:00 2001 From: "kaf24@labyrinth.cl.cam.ac.uk" Date: Sat, 15 Feb 2003 16:42:33 +0000 Subject: [PATCH] bitkeeper revision 1.47 (3e4e6df96Pca-sBuWBs3QlLpN1RcAQ) ide-xeno.c: Fix IDE probe to properly map domain memory. --- xen-2.4.16/drivers/ide/ide-xeno.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/xen-2.4.16/drivers/ide/ide-xeno.c b/xen-2.4.16/drivers/ide/ide-xeno.c index d5d4bc2d8a..0b7e481ddf 100644 --- a/xen-2.4.16/drivers/ide/ide-xeno.c +++ b/xen-2.4.16/drivers/ide/ide-xeno.c @@ -3,12 +3,14 @@ #include #include #include - +#include +#include void ide_probe_devices (xen_disk_info_t* xdi) { int loop; unsigned int unit; + xen_disk_info_t *xen_xdi = map_domain_mem(virt_to_phys(xdi)); for (loop = 0; loop < MAX_HWIFS; ++loop) { @@ -21,19 +23,19 @@ void ide_probe_devices (xen_disk_info_t* xdi) if (drive->present) { capacity = current_capacity (drive); - xdi->disks[xdi->count].type = XEN_DISK_IDE; - xdi->disks[xdi->count].capacity = capacity; - xdi->count++; + xen_xdi->disks[xen_xdi->count].type = XEN_DISK_IDE; + xen_xdi->disks[xen_xdi->count].capacity = capacity; + xen_xdi->count++; - printk (KERN_ALERT "IDE-XENO %d\n", xdi->count); - printk (KERN_ALERT " capacity 0x%lx\n", capacity); - printk (KERN_ALERT " head 0x%x\n", drive->bios_head); - printk (KERN_ALERT " sector 0x%x\n", drive->bios_sect); - printk (KERN_ALERT " cylinder 0x%x\n", drive->bios_cyl); + printk (KERN_ALERT "IDE-XENO %d\n", xen_xdi->count); + printk (KERN_ALERT " capacity 0x%lx\n", capacity); + printk (KERN_ALERT " head 0x%x\n", drive->bios_head); + printk (KERN_ALERT " sector 0x%x\n", drive->bios_sect); + printk (KERN_ALERT " cylinder 0x%x\n", drive->bios_cyl); } } } } - return; + unmap_domain_mem(xen_xdi); } -- 2.30.2